﻿//加载页面js
$(document).ready(function(){
	var chart;
	initPage();
});

function initPage() {	
	$('div.c_right').tabs({
		containerClass: "c_r_body",
		selectedClass: "on",
		hash: true
	});
	//查询信息列表
 
	//类型分析  饼图
	
	 $("#button_2d_t").click(function() {
		$("#result_search_t").warning(TXT_POSTDATA);
		$('#scform_t').disabled();
		$("chartdiv_t").html("");
		//显示统计图表
		chart = new FusionCharts("../js/FusionCharts/Pie2D.swf", "ChartId", "800", "350", "0", "0");
		chart.addParam('wmode', 'opaque');
		var url= "../db/statistics_type_total_xml_t.asp?ksrq_t="+$("#ksrq_t").val()+"&jsrq_t="+$("#jsrq_t").val();
		//$("#div_rslist").warning(escape(url));
		chart.setDataURL(escape(url));  
		chart.render("chartdiv_t");		
		setTimeout( function() {									
			$('#scform_t').enabled();
			$("#result_search_t").warning("");
		}, 800);
     }); 
	 $("#button_3d_t").click(function() {
		 $("#result_search_t").warning(TXT_POSTDATA);
		 $('#scform_t').disabled();
		 $("chartdiv_t").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/Pie3D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_t.asp?ksrq_t="+$("#ksrq_t").val()+"&jsrq_t="+$("#jsrq_t").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_t");		
		 setTimeout( function() {									
			 $('#scform_t').enabled();
			 $("#result_search_t").warning("");
		 }, 800);
	 }); 
 
	 
	 //类型分析  分类  柱状图
	 $("#button_2d_tm").click(function() {
		 $("#result_search_tm").warning(TXT_POSTDATA);
		 $('#scform_tm').disabled();
		 $("chartdiv_tm").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_tm.asp?ksrq_tm="+$("#ksrq_tm").val()+"&jsrq_tm="+$("#jsrq_tm").val()+"&leibie="+escape($("#leibie").val());
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(encodeURIComponent(escape(url)) ); 
		 chart.render("chartdiv_tm");		
		 setTimeout( function() {									
			 $('#scform_tm').enabled();
			 $("#result_search_tm").warning("");
		 }, 800);
	 }); 
	 $("#button_3d_tm").click(function() {
		 $("#result_search_tm").warning(TXT_POSTDATA);
		 $('#scform_tm').disabled();
		 $("chartdiv_tm").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn3D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_tm.asp?ksrq_tm="+$("#ksrq_tm").val()+"&jsrq_tm="+$("#jsrq_tm").val()+"&leibie="+escape($("#leibie").val());
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(encodeURIComponent(escape(url)) ); 
		 chart.render("chartdiv_tm");		
		 setTimeout( function() {									
			 $('#scform_tm').enabled();
			 $("#result_search_tm").warning("");
		 }, 800);
	 }); 
	 $("#button_ScrollColumn2D_tm").click(function() {
		 $("#result_search_tm").warning(TXT_POSTDATA);
		 $('#scform_tm').disabled();
		 $("chartdiv_tm").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/ScrollColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_tm.asp?ksrq_tm="+$("#ksrq_tm").val()+"&jsrq_tm="+$("#jsrq_tm").val()+"&leibie="+escape($("#leibie").val());
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(encodeURIComponent(escape(url)) ); 
		 chart.render("chartdiv_tm");		
		 setTimeout( function() {									
			 $('#scform_tm').enabled();
			 $("#result_search_tm").warning("");
		 }, 800);
	 }); 
	 
	 //类型分析  商品 柱状图
	 $("#button_2d_p").click(function() {
		 $("#result_search_p").warning(TXT_POSTDATA);
		 $('#scform_p').disabled();
		 $("chartdiv_p").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_p.asp?ksrq_p="+$("#ksrq_p").val()+"&jsrq_p="+$("#jsrq_p").val()+"&spfl_p="+$("#spfl_p").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_p");		
		 setTimeout( function() {									
			 $('#scform_p').enabled();
			 $("#result_search_p").warning("");
		 }, 800);
	 }); 
	 $("#button_3d_p").click(function() {
		 $("#result_search_p").warning(TXT_POSTDATA);
		 $('#scform_p').disabled();
		 $("chartdiv_p").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn3D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_p.asp?ksrq_p="+$("#ksrq_p").val()+"&jsrq_p="+$("#jsrq_p").val()+"&spfl_p="+$("#spfl_p").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_p");	
		 setTimeout( function() {									
			 $('#scform_p').enabled();
			 $("#result_search_p").warning("");
		 }, 800);
	 }); 
	 $("#button_ScrollColumn2D_p").click(function() {
		 $("#result_search_p").warning(TXT_POSTDATA);
		 $('#scform_p').disabled();
		 $("chartdiv_p").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/ScrollColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml_p.asp?ksrq_p="+$("#ksrq_p").val()+"&jsrq_p="+$("#jsrq_p").val()+"&spfl_p="+$("#spfl_p").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_p");	
		 setTimeout( function() {									
			 $('#scform_p').enabled();
			 $("#result_search_p").warning("");
		 }, 800);
	 }); 
	 
	 //类型分析  服务 柱状图
	 $("#button_2d_s").click(function() {
		 $("#result_search_s").warning(TXT_POSTDATA);
		 $('#scform_s').disabled();
		 $("chartdiv_s").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml.asp?ksrq_s="+$("#ksrq_s").val()+"&jsrq_s="+$("#jsrq_s").val()+"&xxly_s="+$("#xxly_s").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_s");		
		 setTimeout( function() {									
			 $('#scform_s').enabled();
			 $("#result_search_s").warning("");
		 }, 800);
	 }); 
	 $("#button_3d_s").click(function() {
		 $("#result_search_s").warning(TXT_POSTDATA);
		 $('#scform_s').disabled();
		 $("chartdiv_s").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/MSColumn3D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml.asp?ksrq_s="+$("#ksrq_s").val()+"&jsrq_s="+$("#jsrq_s").val()+"&xxly_s="+$("#xxly_s").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_s");	
		 setTimeout( function() {									
			 $('#scform_s').enabled();
			 $("#result_search_s").warning("");
		 }, 800);
	 }); 
	 $("#button_ScrollColumn2D").click(function() {
		 $("#result_search_s").warning(TXT_POSTDATA);
		 $('#scform_s').disabled();
		 $("chartdiv_s").html("");
		 //显示统计图表
		 chart = new FusionCharts("../js/FusionCharts/ScrollColumn2D.swf", "ChartId", "800", "350", "0", "0");
		 chart.addParam('wmode', 'opaque');
		 var url= "../db/statistics_type_total_xml.asp?ksrq_s="+$("#ksrq_s").val()+"&jsrq_s="+$("#jsrq_s").val()+"&xxly_s="+$("#xxly_s").val();
		 //$("#div_rslist").warning(escape(url));
		 chart.setDataURL(escape(url));  
		 chart.render("chartdiv_s");	
		 setTimeout( function() {									
			 $('#scform_s').enabled();
			 $("#result_search_s").warning("");
		 }, 800);
	 }); 

}


 
 